module two {
	export function showTip(message: string): MessageTip {
		let tip = new MessageTip(message);
		tip.percentWidth = tip.percentHeight = 100;
		two.showTipView(tip);
		return tip;
	}
	
	export class MessageTip extends BaseComponent {
		private message: string;
		public constructor(message: string) {
			super("MessageTip");
			this.message = message;
		}

		public messageTxt: eui.Label;
		protected created(): void {
			super.created();
			this.messageTxt.text = this.message;

			this.alpha = 0;
			egret.Tween.get(this).to({ alpha: 1 }, 200).to({y:-200},400).wait(1000).to({ alpha: 0 }, 200).call(() => {
				this.parent.removeChild(this);
			}, this);
		}
	}
}